//
//  Model.m
//  08 - UItableVIew
//
//  Created by 韩旭 on 16/7/25.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "Model.h"

@implementation Model

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}
- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)mWithDic:(NSDictionary *)dic {
    return [[Model alloc] initWithDic:dic];
}

+ (NSArray *)groups {
    NSString *path = [[NSBundle mainBundle] pathForResource:@"DLS160710(1)" ofType:@"plist"];
    NSArray *arr = [NSArray arrayWithContentsOfFile:path];
    NSMutableArray *arrDicSource = [NSMutableArray array];
    for (NSDictionary *dic in arr) {
        [arrDicSource addObject:[self mWithDic:dic]];
    }
    return arrDicSource;
}



@end
